package com.center.biz.impl;

import com.center.api.model.EduWebsiteCourse;
import com.center.api.remote.RemoteEduWebsiteCourseService;
import com.center.biz.dao.EduWebsiteCourseMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service(version = "1.0",interfaceClass = RemoteEduWebsiteCourseService.class)
public class RemoteEduWebsiteCourseServiceImpl implements RemoteEduWebsiteCourseService {

    @Autowired
    private EduWebsiteCourseMapper eduWebsiteCourseMapper;

    @Override
    public int save(EduWebsiteCourse eduWebsiteCourse) {
        return eduWebsiteCourseMapper.insertSelective(eduWebsiteCourse);
    }

    @Override
    public int update(EduWebsiteCourse eduWebsiteCourse) {
        return eduWebsiteCourseMapper.updateByPrimaryKeySelective(eduWebsiteCourse);
    }

    @Override
    public int delete(int id) {
        return eduWebsiteCourseMapper.deleteByPrimaryKey(id);
    }

    @Override
    public List<EduWebsiteCourse> select(EduWebsiteCourse eduWebsiteCourse) {
        return null;
    }

    @Override
    public EduWebsiteCourse getById(int id) {
        return eduWebsiteCourseMapper.selectByPrimaryKey(id);
    }
}
